The present disclosure relates to identifying function samples for use in interpolation, such as identifying appropriate interpolation inputs from a one dimensional sampled curve of a color profile using unevenly spaced samples.
Image processing applications often process image data using interpolation based on a sampled function. For example, the International Color Consortium (ICC) has defined a color profile format that includes one dimensional (1D) sampled curves. A 1D sampled curve represents a function y=f(x), where x is the input and y is the output, that can be used to process image data. The x-values of a 1D sampled curve in an ICC color profile are evenly spaced over a region of interest. For example, a curve defined over the domain [0, 1], with N samples would have x-values of {0, 1/(N−1), 2/(N−1), 3/(N−1), . . . , 1}, and the corresponding y-values would be provided for each of these x-values. Thus, a given input value can be readily converted to two indices into the y-values according to: (1) first index=floor((N−1)*input value); and (2) second index=ceiling((N−1)*input value). The y-values located at the first and second indices can then be used in the interpolation performed for the input value. In other words, a simple indexing operation gives the points that should be used for interpolation.
Some have proposed that the ICC should adopt an interpolation method based on a function having unevenly spaced samples. The use of an uneven sampling of the input range of the function may be desirable both in ICC profiles, and in other applications. The use of uneven sampling of the input range allows one to specify more resolution (of the function) in a particular sub-range compared to a different sub-range. For example, a simple 8-sample curve may have x-values of {0, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8, 1.0} which provides a higher resolution in the lower range [0, 0.4], and a lower resolution in the higher range [0.4, 1]. However, when uneven sample points are used, a search operation (e.g., a binary search) is often required to determine where the input value falls in the set of x-value sample points, and thus which two sample y-values to use for interpolation.